Micron Document
baubs git

Node / mirrors / respira / commits / 5aa4e15

Commit 5aa4e15922cb4ccfabf15b642f8efd3b913b3933


Parents : 4593b66
Author : Jan-Henrik Bruhn <jan-henrik.bruhn@offis.de>
Date : 2025-12-22T12:00:54+01:00

fix: Improve destructive Alert variant styling

Update the destructive variant to use proper danger colors (light red background with dark red text in light mode, dark red background with light text in dark mode) instead of the previous white background with red text.

This allows semantic use of variant="destructive" throughout the app without custom styling overrides.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Changes

2 files changed, 3 insertions(+), 6 deletions(-)


Diff

diff --git a/src/components/FileUpload.tsx b/src/components/FileUpload.tsx
index 5c05105..eb65511 100644
--- a/src/components/FileUpload.tsx
+++ b/src/components/FileUpload.tsx
@@ -386,11 +386,8 @@ export function FileUpload() {
)}
{pesData && boundsCheck.error && (
- <Alert
- variant="destructive"
- className="bg-danger-100 dark:bg-danger-900/20 border-danger-200 dark:border-danger-800"
- >
- <AlertDescription className="text-danger-900 dark:text-danger-100 text-sm">
+ <Alert variant="destructive">
+ <AlertDescription>
<strong>Pattern too large:</strong> {boundsCheck.error}
</AlertDescription>
</Alert>

diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx
index aa7de24..b0c828f 100644
--- a/src/components/ui/alert.tsx
+++ b/src/components/ui/alert.tsx
@@ -10,7 +10,7 @@ const alertVariants = cva(
variant: {
default: "bg-card text-card-foreground",
destructive:
- "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
+ "bg-danger-100 dark:bg-danger-900/20 border-danger-200 dark:border-danger-800 text-danger-900 dark:text-danger-100 [&>svg]:text-current *:data-[slot=alert-description]:text-danger-900 dark:*:data-[slot=alert-description]:text-danger-100",
},
},
defaultVariants: {

Served by rngit 1.3.3 - Generated in 0.05s